<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>debugger使用</title>
</head>

<body>
    <script>
        function getSum(index) {
            // 打开控制台刷新浏览器，自动在该地方断点
            debugger
            let sum = 0
            for (let i = 0; i < index; i++) {
                sum += i
            }
            return sum
        }

        getSum(100)
    </script>
</body>

</html>